Skip to content

Comments

feat(create-app): add custom template support via GitHub template sources #641

Merged
kabaros merged 7 commits intodhis2:masterfrom
derrick-nuby:feat/create-app-custom-template-via-git
Feb 24, 2026
Merged

feat(create-app): add custom template support via GitHub template sources #641
kabaros merged 7 commits intodhis2:masterfrom
derrick-nuby:feat/create-app-custom-template-via-git

Conversation

@derrick-nuby
Copy link
Contributor

@derrick-nuby derrick-nuby commented Feb 12, 2026

Summary

This PR adds support for using a GitHub repository as a template source in @dhis2/create-app.
In addition to built-in templates (basic, react-router), users can now scaffold from public GitHub template repositories using shorthand or URL formats, with optional branch targeting.

What Changed

  1. Added template source parsing and detection for GitHub specifiers.
  2. Added external template source resolver for remote GitHub templates cloned into a temporary directory.
  3. Updated create flow to keep built-in template resolution in index.js, and use external resolver + cleanup in finally for Git templates.
  4. Added interactive flow option for Custom template from Git.
  5. Updated create-app docs and command docs with usage examples.

Supported Template Formats

  1. owner/repo
  2. owner/repo#ref
  3. https://github.com/owner/repo
  4. https://github.com/owner/repo#ref

Validation

Executed local and smoke tests for:

  1. Existing built-in template flow (regression-safe behavior).
  2. GitHub URL template source.
  3. GitHub URL with branch ref.
  4. Shorthand owner/repo#ref.

Notes

  1. Scope intentionally focuses on GitHub and public repositories.
  2. Private repo auth UX and non-GitHub hosts are out of scope for this PR.
  3. I did not include tests as this repo doesn't have a test suite, but I manually verified all scenarios and flows.

Copy link
Contributor

@kabaros kabaros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this @derrick-nuby ! I left some comments here .. let me know if it's not clear, or you disagree

Thanks again for the great code, and taking initiative in adding this feature 🙏🏿

@derrick-nuby derrick-nuby requested a review from kabaros February 23, 2026 15:08
@kabaros kabaros changed the title feat(create-app): add custom template support via GitHub template sources feat(create-app): add custom template support via GitHub template sources Feb 24, 2026
@sonarqubecloud
Copy link

@kabaros kabaros merged commit bb7ad85 into dhis2:master Feb 24, 2026
6 of 7 checks passed
dhis2-bot added a commit that referenced this pull request Feb 24, 2026
# [5.4.0](v5.3.1...v5.4.0) (2026-02-24)

### Features

* **create-app:** add custom template support via GitHub template sources  ([#641](#641)) ([bb7ad85](bb7ad85))
@dhis2-bot
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants